﻿<!--
Copyright © 1998, 2009, Oracle and/or its affiliates.  All rights reserved.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	
<link rel="stylesheet" type="text/css" href="../css/certificate.css">
<script language="javascript" src="../js/resource.js"></script>
<script language="javascript" src="../js/browser.js"></script>
<script language="javascript" src="../js/noevents.js"></script>

<script>


// get today's date
var today = new Date();

var fat=GetQueryStringValue("FATPLAYER");

var mmm=GetQueryStringValue("ModuleDesc");
if (mmm=="1")
{
	if (fat.length>0)
		FatPlayerCommand("CERTIFICATION_GETMODULENAME");
	else if (opener.Certification_GetModuleName)
		mmm=opener.Certification_GetModuleName();
	
}

function SetModuleName(s)
{
	mmm=s;
}

var ttt=GetQueryStringValue("TopicDesc");

if (ttt=="1")
{
	if (fat.length>0)
		FatPlayerCommand("CERTIFICATION_GETTOPICNAME");
	else if (opener.Certification_GetTopicName)
		ttt=opener.Certification_GetTopicName();
}

function SetTopicName(s)
{
	ttt=s;
}

if (fat.length>0)
{
	mmm=unescape(mmm);
	ttt=unescape(ttt);
};

var ModuleDesc = unescape(mmm);
var TopicDesc = unescape(ttt);
var PctComplete = GetQueryStringValue("PctComplete");
var PctNeeded = GetQueryStringValue("PctNeeded");


document.title = ModuleDesc + " - " + TopicDesc + R_certificate_TitleExtension;

function GetQueryStringValue(param) {

	var strQueryString = "";

	if (self.location.search.length>1) {
		// this was a get request where the results are in location.search (URL?...)
		strQueryString = self.location.search.substr(1);
	}
	else if (self.location.hash.length>1) {
		// this used the hash method (URL#...)
		strQueryString = self.location.hash.substr(1);
	}

	var k=strQueryString.indexOf("%26");
	while(k!=(-1))
	{
		s=strQueryString.substr(0,k)+"&"+strQueryString.substr(k+3);
		strQueryString=s;
		k=strQueryString.indexOf("%26");
	};

	var QueryItems = strQueryString.split("&");
	for (var i=0; i < QueryItems.length; i++){
		var QueryItem = QueryItems[i];
		var intEqPos = QueryItem.indexOf("=")
		var strName = QueryItem.substr(0, intEqPos)
		if (strName == param) {
			return QueryItem.substr(intEqPos+1)
		}
	}
	
	// no querystring item found
	return "";
}

function PrintReport() {
		//hide('buttonsHide');
		window.print();
		show('buttonsHide');
	}

function window_onload()
{
	SetNoEvents();
	PrintReport();
}

function CloseWindow()
{
	if (GetQueryStringValue("FATPLAYER")=="FS" || GetQueryStringValue("FATPLAYER")=="WEB")
	{
		FatPlayerCommand("CERTIFICATION_CLOSE","");
	}
	else
		window.close();
}
</script>
	
</head>

<body bottommargin="0" marginheight="0" leftmargin="0" marginwidth="0" rightmargin="0" topmargin="0" onload="window_onload();return false">
<table width="600" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
	</tr>
	<tr>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
		<td width="100%">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<!-- reverse banner -->
				<tr>
					<td valign="top" colspan="3">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td valign="middle" nowrap><a class="KnowItPOMain"><script>document.write(R_certificate_header);</script></a></td>
								<td align="right" width="100%" valign="top"><img src="giftrk1.gif" width="10" height="10" border="0" alt=""></td>
								<td valign="top"><img src="giftrk1.gif" width="8" height="24" border="0" alt=""></td>
								<td valign="top"><img src="small_logo.gif" border="0" alt="" class="KnowItPOLogo"></td>
								
							</tr>
							<tr>
								<td valign="top" colspan="4"><img src="003366line.gif" width="100%" height="1" border="0" alt=""></td>
							</tr>
							<tr>
								<td colspan="4"><img src="giftrk1.gif" width="2" height="30" border="0" alt=""></td>
							</tr>
						</table>
					</td>
				</tr>
			<!-- Scoring Content -->
				<tr>
					<td valign="top" colspan="3" width="100%">
						<table border="0" cellspacing="0" cellpadding="0" width="100%">
							<tr>
								<td valign="top">
								<a class="KnowItPOTopic"><script>document.write(ModuleDesc+"<br>"+TopicDesc);</script><br><img src="giftrk1.gif" width="11" height="6" border="0"><br></a>
									<table width="100%" border="1" cellspacing="0" cellpadding="6">
										<tr>
											<td>
											<a class="KnowItPOPass"><b><script>document.write(R_certificate_result);</script></b>&nbsp; </a>
											</td>
											<td>
											<a class="KnowItPOPass">&nbsp;
												<script>
													if (Number(PctComplete) >= Number(PctNeeded)) {
														document.write(R_certificate_pass);
													}
													else {
														document.write(R_certificate_fail);
													}
												
												</script>
											</a>
											</td>
										</tr>
										<tr>
											<td>
											<a class="KnowItPOCat"><script>document.write(R_certificate_percentComplete);</script>&nbsp; </a>
											</td>
											<td>
											<a class="KnowItPORes">&nbsp;<script>document.write(PctComplete + R_certificate_PCTChar);</script></a>
											</td>
										</tr>
										<tr>
											<td>
											<a class="KnowItPOCat"><script>document.write(R_certificate_percentNeeded);</script>&nbsp; </a>
											</td>
											<td>
											<a class="KnowItPORes">&nbsp;<script>document.write(PctNeeded + R_certificate_PCTChar);</script></a>
											</td>
										</tr>
										<tr>
											<td>
											<a class="KnowItPOCat"><script>document.write(R_certificate_DateTime)</script>&nbsp; </a>
											</td>
											<td nowrap>
											<script>
											document.write ('<a class="KnowItPORes">' + today.toLocaleString() + '</a>');
											</script>
											</td>
										</tr>
									</table>
								</td>
								
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="3">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="giftrk1.gif" width="20" height="80" border="0" alt=""></td>
								<td valign="bottom" align="right">________________________________________</td>
							</tr>
							<tr>
								<td><img src="giftrk1.gif" width="20" height="8" border="0" alt=""></td>
								<td valign="bottom" align="right"><a class="KnowItPOSignat"><script>document.write(R_certificate_signature);</script></a></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
	</tr>
	<tr>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
		<td><img src="giftrk1.gif" width="20" height="20" border="0" alt=""></td>
	</tr>
</table>

<div id="buttonsHide" name="buttonsHide" style="{visibility:hidden}">
<form action name="frmPrint" id="frmPrint" method="post" target="_top">

<table width="600" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td align="center">
		<table>
		<tr>
		<!--<td>
			<script>
			document.write('<INPUT type="button" value="' + R_certificate_print + '" onclick="PrintReport(); return false;" id=button1 name=button1>');
			</script>
		</td>
		-->
		<td>
			<script>
			document.write('<INPUT type="button" value="' + R_certificate_close + '" onclick="CloseWindow(); return false;" id=close1 name=close1>');
			</script>
		</td>
		</tr>
		</table>
		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>
